home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / share / apport / kernel_oops < prev    next >
Encoding:
Text File  |  2009-09-25  |  935 b   |  33 lines

  1. #!/usr/bin/python
  2. #
  3. # Collect information about a kernel oops.
  4. #
  5. # Copyright (c) 2008 Canonical Ltd.
  6. # Author: Matt Zimmerman <mdz@canonical.com>
  7. #
  8. # This program is free software; you can redistribute it and/or modify it
  9. # under the terms of the GNU General Public License as published by the
  10. # Free Software Foundation; either version 2 of the License, or (at your
  11. # option) any later version.  See http://www.gnu.org/copyleft/gpl.html for
  12. # the full text of the license.
  13.  
  14. import os, sys
  15. import apport, apport.fileutils
  16.  
  17. from gettext import gettext as _
  18.  
  19. oops = sys.stdin.read()
  20.  
  21. pr = apport.Report('KernelOops')
  22. pr['Failure'] = 'oops'
  23. pr['Tags'] = 'kernel-oops'
  24. pr['Annotation'] = _('Your system might become unstable now and might need to be restarted.')
  25.  
  26. pr['Package'] = 'linux-image-' + os.uname()[2]
  27. pr['SourcePackage'] = 'linux'
  28.  
  29. pr['OopsText'] = oops
  30.  
  31. # write report
  32. pr.write(open(apport.fileutils.make_report_path(pr), 'w'))
  33.